<?php

namespace IDock\Insurance\DAJIA\Request;

use IDock\Insurance\DAJIA\Request\AllDAJIARequest;
use IDock\Insurance\DAJIA\Response\CommonResponse;
use IDock\Insurance\DAJIA\Response\InsuranceOrderQueryResponse;
use IDock\Insurance\DAJIA\Response\PolicyPaymentResponse;
use IDock\Printer\NonCar\NonCarInquirySinglePrinter;
use IDock\Visitor\PolicyPaymentVisitor;
use IDock\Visitor\Premium\PremiumInquiryVisitor;

/**
 * 查询保单接口
 */
class ElectronicSignQueryRequest extends AllDAJIARequest
{
    protected $code = 'ODR1011';

    protected $response = PolicyPaymentResponse::class;

    protected $urlTip = '获取电子签名页面接口';

    /**
     * @var PolicyPaymentVisitor $visitor
     */
    protected $visitor;


    public function generate(): array
    {
        /**
         * @var NonCarInquirySinglePrinter $noCar
         */
        $noCar = $this->visitor->nonCarInquirySingle[0] ?? [];
        return [
            'orderNo' => $this->visitor->argc['orderNo'],
            'operCde' => $this->visitor->argc['busiOprCde'],
            'noVhlAppNo' => $noCar ? $noCar->inquiryNo : '',
        ];
    }



}
